cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
    },

    // use this for initialization
    onLoad: function () {

    },

    // called every frame, uncomment this function to activate update callback
     update: function (dt) {
         //var thisRect = this.node.getBoundingBoxToWorld()
         //for(var i=0;i<cc.vv.game.bullets.length;i++){
         //    var bullet = cc.vv.game.bullets[i]
         //    var bulletRect = cc.vv.game.monster.getBoundingBoxToWorld()
         //    //console.log('bullet bounding box:'+thisRect.x+'  '+thisRect.y+'  '+thisRect.width+'  '+thisRect.height)
         //    //console.log('monster bounding box:'+bulletRect.x+'  '+bulletRect.y+'  '+bulletRect.width+'  '+bulletRect.height)
         //    if(thisRect.intersects(bulletRect)){
         //        console.log('oooooooooooooooooooooooo')
         //       this.node.active = false
         //        this.node.removeFromParent(true)
         //
         //        bullet.active = false
         //        bullet.removeFromParent(true)
         //
         //        cc.vv.game.bullets.splice(cc.vv.game.bullets.indexOf(bullet),1)
         //        return
         //    }
         //}
     },
});
